/*abstract class Shape{
    public abstract void draw();//抽象方法;
}
class Rect extends Shape{//当一个普通类继承了这个抽象类之后，普通类要重写抽象类中所有的抽象方法
    @Override
    public void draw() {
        System.out.println("矩形");
    }
}
class Flower extends Shape{
    @Override
    public void draw() {
        System.out.println("花");
    }
}
public class Test1 {
    public static void main(String[] args) {
        Shape shape  = new Rect();//能发生向上转型;
        drawMap(new Rect());
        drawMap(new Flower());
    }
    public static void drawMap(Shape shape){
        shape.draw();


    }*/



    //Shape shape = new Shape();抽象类不可以被实例化，抽象类只能被继承





